package com.study.design.model.structPattern.flyWeight;

/**
* @Name: ConcreteChess
* @Description: 具体享元类：为内部状态提供成员变量，进行存储
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-2-15 下午2:42:54 
* @Version: V1.0
 */
public class ConcreteChess implements ChessFlyWeight {
	
	private String color ;

	public ConcreteChess(String color) {
		this.color = color;
	}

	@Override
	public void setColor(String color) {
		this.color = color ;
	}

	@Override
	public String getColor() {
		return this.color ;
	}

	@Override
	public void display(Coordinate c) {
		System.out.println("棋子颜色:" + color);
		System.out.println("棋子坐标:" + c.getX() + "--" + c.getY());
	}
	
	

}
